package com.itheima.stock.mapper;

import com.itheima.stock.pojo.entity.SysRole;
import com.itheima.stock.pojo.entity.SysUserRole;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author 46035
 * @description 针对表【sys_user_role(用户角色表)】的数据库操作Mapper
 * @createDate 2022-09-19 15:48:56
 * @Entity com.itheima.stock.pojo.entity.SysUserRole
 */
public interface SysUserRoleMapper {

    int deleteByPrimaryKey(Long id);

    int insert(SysUserRole record);

    int insertSelective(SysUserRole record);

    SysUserRole selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(SysUserRole record);

    int updateByPrimaryKey(SysUserRole record);

    List<String> getRolesIdByUserId(String userId);

    int deleteUserRolesByUserId(Long userId);

    int updateUserRoles(@Param("roles") List<SysUserRole> roles);
}
